using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using TanashCMS.Business;
using MembershipUtilities;

public partial class manager_members_Default : CMSManagementPageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void gvMembers_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            MembershipUserWrapperForMP user = (MembershipUserWrapperForMP)e.Row.DataItem;
            TanashWebsite website = Configuration.GetCurrentSession().Get<TanashWebsite>(user.WebsiteID);
            Label lblWebsite = (Label)e.Row.FindControl("lblWebsite");
            lblWebsite.Text = website.Title;
        }
    }
    protected void btnAddUser_Click(object sender, EventArgs e)
    {
        Response.Redirect("AddEditUser.aspx");
    }
    protected void odsMembers_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
    {
        if (User.IsInRole("administrator"))
            e.InputParameters["rolesToInclude"] = "*";
    }
}
